

<%@ page import="org.tailor.Trans" %>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="layout" content="main" />
  <g:set var="entityName" value="${message(code: 'trans.label', default: 'Trans')}" />
  <title><g:message code="default.create.label" args="[entityName]" /></title>
</head>
<body>
  <div class="nav">
    <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></span>
    <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></span>
  </div>
  <div class="body">
    <h1><g:message code="default.create.label" args="[entityName]" /></h1>
    <g:if test="${flash.message}">
      <div class="message">${flash.message}</div>
    </g:if>
    <g:hasErrors bean="${transInstance}">
      <div class="errors">
        <g:renderErrors bean="${transInstance}" as="list" />
      </div>
    </g:hasErrors>
    <g:form action="save" >
      <div class="dialog">
        <table>
          <tbody>
            <tr class="prop">
              <td valign="top" class="name">
                <label for="transactionNumber"><g:message code="trans.transactionNumber.label" default="Transaction Number" /></label>
              </td>
              <td valign="top" class="value ${hasErrors(bean: transInstance, field: 'transactionNumber', 'errors')}">
          <g:textField name="transactionNumber" value="${fieldValue(bean: transInstance, field: 'transactionNumber')}" />
          </td>
          </tr>

          <tr class="prop">
            <td valign="top" class="name">
              <label for="clientIdClient"><g:message code="trans.clientIdClient.label" default="Client Id Client" /></label>
            </td>
            <td valign="top" class="value ${hasErrors(bean: transInstance, field: 'clientIdClient', 'errors')}">
          <g:select name="clientIdClient.id" from="${org.tailor.Client.list()}" optionKey="id" value="${transInstance?.clientIdClient?.id}"  />
          </td>
          </tr>
          <tr class="prop">
            <td valign="top" class="name">
              <label for="orderDate"><g:message code="trans.orderDate.label" default="Order Date" /></label>
            </td>
            <td valign="top" class="value ${hasErrors(bean: transInstance, field: 'orderDate', 'errors')}">
          <g:datePicker name="orderDate" precision="day" value="${transInstance?.orderDate}" default="none" noSelection="['': '']" />
          </td>
          </tr>



          </tbody>
        </table>
      </div>
      <div class="buttons">
        <span class="button"><g:submitButton name="create" class="save" value="${message(code: 'default.button.create.label', default: 'Create')}" /></span>
      </div>
    </g:form>
  </div>
</body>
</html>
